<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>查询结果</title>
  <%= stylesheet_link_tag 'main' %>
  <%= stylesheet_link_tag 'xtree' %>
  <%= stylesheet_link_tag 'sortabletable' %>
  <%= javascript_include_tag 'prototype' %>
  <%= javascript_include_tag 'effects' %>
  <%= javascript_include_tag 'sortabletable' %>
  <%= javascript_include_tag 'xtree', 'xmlextras', 'xloadtree', 'xradiotree', 'xradioloadtree', 'xcheckboxtree', 'xcheckboxloadtree', 'function'  %>
 </head>
 
<%@title = '查询结果' %>
<SCRIPT language="javascript">
	//指标值三维数组定义
	//第一维，代表各个单位
	//第二维，代表各个所属期
	//第三维，代表各个指标名称
	var scareArray = new Array;
	//指标名称数组定义
	var scareNames = new Array;
	//指标名称数组定义,纯文本，不带链接
	var scareNames_text = new Array;
	
	//单位名称数组定义
	var userNames  = new Array;	
	//单位名称数组定义
	var userNames_text  = new Array;
	
	//所属期名字数组定义
	var periods = new Array;

	var titleRowArray = new Array; // 表格标题
	
	<% Integer(0).upto(@scalars.size-1) do |index|%>
	   scareNames[<%=index%>] = "<a href='javascript:chartscalar(<%=index%>)'><%=@scalar_desc[index]%></a>";
	   scareNames_text[<%=index%>] = "<%=@scalar_desc[index]%>";
	<% end%>
	
	<% Integer(0).upto(@units.size-1) do |index|%>
	   userNames[<%=index%>] = "<a href='javascript:chartunit(<%=index%>)'><%=@units[index][@meta.unitname]%></a>";
	   userNames_text[<%=index%>] = "<%=@units[index][@meta.unitname]%>";
	<% end%>
	
	<% Integer(0).upto(@tasktimes.size-1) do |index|%>
	   periods[<%=index%>] = "<%=GetTaskTimeDescString(@tasktimes[index])%>";
	<% end%>
	
	<%cursor = 0%>
	<% Integer(0).upto(@units.size-1) do |index1|%>
	   scareArray[<%=index1%>]= new Array;
	   <% Integer(0).upto(@tasktimes.size-1) do |index2|%>
	       scareArray[<%=index1%>][<%=index2%>]= new Array;
	       <% record = @order_result[@units[index1].unitid.to_s][@tasktimes[index2].id.to_s] %>
	       <% if record %>
	           <% Integer(0).upto(@scalars.size-1) do |index3|%>
	               scareArray[<%=index1%>][<%=index2%>][<%=index3%>] = "<%=record[@scalars[index3]]%>";
	           <% end%>
	       <% else %>
	           <% Integer(0).upto(@scalars.size-1) do |index3|%>
	               scareArray[<%=index1%>][<%=index2%>][<%=index3%>] = "";
	           <% end%>
	       <% end %>
	   <% end%>
	<% end%>
	
	//结果数组
	var convertArray;
	//指标值索引标记
	var scareFlag;
	//查询方式（维度）索引标记
	var mothodFlag;
	//转换标记(用来转换指标结果的行列)
	var changeFlag = false;
</SCRIPT>	

<SCRIPT language="javascript">
/**
 * 清除维度下拉列表框内容
 * @oSelect 列表对象
 */
function clearSelect(oSelect){
	var oOptions = oSelect.options;
        var longths = oOptions.length;
	for(i=0;i<=longths;i++){
		oOptions.remove(0);
	}
}

function chartunit(index)
{
    result = "";
    var first = true
    <% Integer(0).upto(@tasktimes.size-1) do |index2|%>
        <% Integer(0).upto(@scalars.size-1) do |index3|%>
            result += "," + scareArray[index][<%=index2%>][<%=index3%>];
        <% end%>    
    <% end%>
    form1.datas.value = result.substr(1, result.length-1);
    
    result = "";
    first = true
    <% Integer(0).upto(@scalars.size-1) do |index|%>
          result += "," + scareNames_text[<%=index%>];
    <% end%>
    form1.scalars.value = result.substr(1, result.length-1);
    form1.action = "/scalarquery/chart";
    form1.submit();
}

function chartscalar(index)
{
    result = "";
    var first = true
    <% Integer(0).upto(@tasktimes.size-1) do |index2|%>
        <% Integer(0).upto(@units.size-1) do |index3|%>
            result += "," + scareArray[<%=index3%>][<%=index2%>][index];
        <% end%>    
    <% end%>
    form1.datas.value = result.substr(1, result.length-1);
    
    result = "";
    first = true
    <% Integer(0).upto(@units.size-1) do |index|%>
          result += "," + userNames_text[<%=index%>];
    <% end%>
    form1.scalars.value = result.substr(1, result.length-1);
    form1.submit();
}

//根据传入的二维数据数组打印表格
function printTable( sourceArray ) {
	var oRow, oCell;
	for ( var i = 0; i < sourceArray.length; i++ ) {
		if ( i == 0 ) {
			//thead
			oRow = oTHead0.insertRow();
		} else {
			//tbody
			oRow = oTBody0.insertRow();
		}
		for ( var j = 0; j < sourceArray[i].length; j++ ) {
			oCell = oRow.insertCell();
			//oCell.align="right"
			oCell.innerHTML = sourceArray[i][j];
		}
	}

	var oTable = document.getElementById( "oTable" );
	var oTypes = new Array();

	var columns = oTable.rows( 0 ).cells.length;
	for ( var i = 0; i < columns; i++ ) {
		if ( i == 0 ) {
			oTypes[i] = "String";
		} else {
			oTypes[i] = "Number";
		}
	}

	var st = new SortableTable(oTable, oTypes);
}

//删除动态表格
function deleteTable() {
	//thead
	j=oTHead0.rows.length;
	for(var i=0; i<j; i++){
		oTHead0.deleteRow(0);
	}

	//tbody
	j=oTBody0.rows.length;
	for(var i=0; i<j; i++){
		oTBody0.deleteRow(0);
	}
}

//初始化显示结果的二维数组（装载指标名称，单位名称等标题头）
function iniTitleNameOfTable( lineTitle,rowTitle ) {
	//根据行数初始化数组
	var lineLength = lineTitle.length;
	var rowLength = rowTitle.length;
	convertArray = new Array;

	for ( var i = 0; i <= rowLength; i++ ) {
		convertArray[i] = new Array;
	}

	convertArray[0][0] = "------";
	//初始化标题值（行标，列标）
	for ( var i = 0; i < lineLength; i++ ) {
		convertArray[0][i + 1] = lineTitle[i];
	}
	for ( var i = 0; i < rowLength; i++ ) {
		convertArray[i + 1][0] = rowTitle[i];
	}
}

//以指标为固定维度，所属期为行，用户为列，显示数据
function displayDataByScareByPU( scareValue ) {
	iniTitleNameOfTable( userNames,periods );

	for(var i = 0; i < scareArray[0].length; i++)
	{
		for(var j = 0; j < scareArray.length; j++)
		{
			convertArray[i+1][j+1] = scareArray[j][i][scareValue];
		}
	}
	printTable(convertArray);
}

//以指标为固定维度，用户为行，所属期为列，显示数据
function displayDataByScareByUP( scareValue ) {
	iniTitleNameOfTable( periods,userNames );
	for( var i = 0; i < scareArray.length; i++ )
	{
		for(var j = 0; j < scareArray[0].length; j++)
		{
			convertArray[i+1][j+1] = scareArray[i][j][scareValue];
		}
	}
	printTable(convertArray);
}

//以用户为固定维度，指标为行，所属期为列，显示数据
function displayDataByuserBySP( user ) {
	iniTitleNameOfTable(periods,scareNames);
	for(var i = 0; i < scareArray[0][0].length; i++)
	{
		for(var j = 0; j < scareArray[0].length; j++)
		{
			convertArray[i+1][j+1] = scareArray[user][j][i];
		}
	}
	printTable(convertArray);
}

//以用户为固定维度，所属期为行，指标为列，显示数据
function displayDataByuserByPS(user) {
	iniTitleNameOfTable(scareNames,periods);
	for(var i = 0; i < scareArray[0].length; i++)
	{
		for(var j = 0; j < scareArray[0][0].length; j++)
		{
			convertArray[i+1][j+1] = scareArray[user][i][j];
		}
	}
	printTable(convertArray);
}
//以所属期为固定维度，指标为行，用户为列，显示数据
function displayDataByperiodBySU(period){
	iniTitleNameOfTable(userNames,scareNames);
	for(var i = 0; i < scareArray[0][0].length; i++)
	{
		for(var j = 0; j < scareArray.length; j++)
		{
			convertArray[i+1][j+1] = scareArray[j][period][i];
		}
	}
	printTable(convertArray);
}
//以所属期为固定维度，用户为行，指标为列，显示数据
function displayDataByperiodByUS(period){
	iniTitleNameOfTable(scareNames,userNames);
	for(var i = 0; i < scareArray.length; i++)
	{
		for(var j = 0; j < scareArray[0][0].length; j++)
		{
			convertArray[i+1][j+1] = scareArray[i][period][j];
		}
	}
	printTable(convertArray);
}

//根据不同的维度创建维度下拉列表框
function createDropDownList(names,indexName){
	document.form1.select1.style.display="inline";
	deleteTable();
	clearSelect(document.form1.select1);

	for(var i=0;i<names.length;i++){
		var oOption = new Option(names[i],i);
		document.form1.select1.add(oOption);
	}
  createTableByListValue(document.form1.select1);
  //doform1();
}
//根据用户在下拉列表框选择的不同维度值生成不同的表格
function createTableByListValue(obj){
	deleteTable();
	//维度下拉列表框索引值（标识固定那一个维度查询）
	selectIndexOpt = obj.options[obj.selectedIndex].value;
	scareFlag = selectIndexOpt;
	
	//查询方式索引值（标识使用那一种方式查询）
	for(var i=0;i<document.form1.radios.length;i++){
		if (document.form1.radios[i].checked) {
			var justValue = document.form1.radios[i].value;
			
			mothodFlag = justValue;
			
			if(justValue==1) {
				displayDataByperiodByUS(selectIndexOpt);
			}
			
			if(justValue==2)	{
				displayDataByuserByPS(selectIndexOpt);
			}
			
			if(justValue==3)	{
				displayDataByScareByPU(selectIndexOpt);
			}
		}
	}
	changeFlag=false;
}
//交换行列
function exchangeRowAndColumn(){
    if(oTBody0.rows.length==0){
       alert("请选择结果显示方式");
       return false;
    }
	deleteTable();

    if(mothodFlag==1){
        if(changeFlag){
          displayDataByperiodByUS(scareFlag);
          changeFlag=false;
          }
        else{
		  displayDataByperiodBySU(scareFlag);
		  changeFlag=true;
        }
    }
    if(mothodFlag==2){
        if(changeFlag){
          displayDataByuserByPS(scareFlag);
          changeFlag=false;
          }
        else{
		  displayDataByuserBySP(scareFlag);
		  changeFlag=true;
        }
    }
    if(mothodFlag==3){
        if(changeFlag){
          displayDataByScareByPU(scareFlag);
          changeFlag=false;
          }
        else{
          displayDataByScareByUP(scareFlag);
		  changeFlag=true;
        }
    }
 //doform1();
}

/**
* 向form1表单创建scalarDatas隐藏域，这些域值是排列过后的scalarDatas值
*/
function createHiddenScalarDatas() {
        removeHiddenScalarDatas();

	var resultHead = document.getElementById("oTHead0");
	var resultHeadRow;

	if( mothodFlag == 4 )
	{
		resultHeadRow = resultHead.rows( resultHead.rows.length - 2 );
	} else
	{
		resultHeadRow = resultHead.rows( resultHead.rows.length - 1 );
	}

	var resultHeadRowCells = resultHeadRow.cells;
	var str="";
	for(var j=0; j<resultHeadRowCells.length-1; j++) {
    	     str = str+resultHeadRowCells[j].innerHTML+",";
        }
	str = str + resultHeadRowCells[j].innerHTML;
	oInput =document.createElement("input");
        oInput.type = "hidden";
        oInput.name = "scalarDatas";
        oInput.value = str;
        document.form1.appendChild(oInput);

	var resultTBody = document.getElementById("oTBody0");
	var resultTBodyRows = resultTBody.rows;

        for (var i=0; i<resultTBodyRows.length; i++)  {
            var str="";
            var rowCells = resultTBodyRows[i].cells;
            for(var j=0; j<rowCells.length; j++){
            if(j==rowCells.length-1){
                str = str+rowCells[j].innerHTML;
             }else{
                str = str+rowCells[j].innerHTML+",";
            }
         }
         oInput =document.createElement("input");
	 oInput.type = "hidden";
    	 oInput.name = "scalarDatas";
    	 oInput.value = str;
    	 document.form1.appendChild(oInput);
       }
}

/**
* 清空form1表单中所有的sacalrDatas隐藏域
*/
function removeHiddenScalarDatas() {
	var cols = new Array();
	var count = 0;

	// 查找隐藏域
	for(var i = 0; i < form1.children.length; i++)
	{
	        if(form1.children[i].name == "scalarDatas")
	        {
			cols[count] = form1.children[i];
			count++;
		}
	}

	// 删除隐藏域
	for(var i = 0; i < cols.length; i++)
	{
		form1.removeChild(cols[i]);
	}
}
//把指标查询结果导出成excel
function buildExcel(){
    if(oTBody0.rows.length==0){
       alert("请选择结果显示方式");
       return false;
    }
	createHiddenScalarDatas();
    form1.action="/scalarquery/query?toexcel=1";
	//form1.target = "_blank";
	form1.submit();
	//removeHiddenScalarDatas();
}
//把指标查询结果导出成图表
function buildBar(){
    if(oTBody0.rows.length==0){
       alert("请选择结果显示方式");
       return false;
    }
    var url="analyse?operation=showScalarChartPage&chartType=bar";

    createHiddenScalarDatas();
    form1.action=url;
    form1.target = "_blank";
    form1.submit();
}
//把指标查询结果导出成图表
function buildPie(){
    if(oTBody0.rows.length==0){
       alert("请选择结果显示方式");
       return false;
    }
    var url="analyse?operation=showScalarChartPage&chartType=pie";

    createHiddenScalarDatas();
    form1.action=url;
    form1.target = "_blank";
    form1.submit();
}
//把指标查询结果导出成图表
function buildLinear(){
    if(oTBody0.rows.length==0){
       alert("请选择结果显示方式");
       return false;
    }
    var url="analyse?operation=showScalarChartPage&chartType=linear";

    createHiddenScalarDatas();
    form1.action=url;
    form1.target = "_blank";
    form1.submit();
}

function showScalarConditionPage()
{
    form1.action = "analyse?operation=showScalarConditionPage";
    form1.submit();
}


// 显示所有的数据，而且显示表头
function displayAllData()
{
        mothodFlag = 4;
	deleteTable(); // 删除表格内容
	clearSelect(document.form1.select1); // 下拉框失效
document.form1.select1.style.display="none";
	// scareArray, scareNames, userNames, periods, convertArray

	// print title
	for(var i=0; i<titleRowArray.length; i++ )
	{
		var oTitleRow = oTHead0.insertRow();

		for( var j=0; j<titleRowArray[i].length; j++ )
		{
			var oTitleCell = oTitleRow.insertCell();
			oTitleCell.innerHTML = titleRowArray[i][j][0];

			oTitleCell.colSpan= titleRowArray[i][j][2]*periods.length;
			oTitleCell.rowSpan = titleRowArray[i][j][3];
		}
	}

	// init table titles
	var oFirstRow = oTHead0.insertRow();
	var oCell = oFirstRow.insertCell();
	oCell.innerHTML = "------";

	var oTimeRow = oTHead0.insertRow();
	var oTimeCell = oTimeRow.insertCell();
	oTimeCell.insertText="&nbsp;&nbsp;";

	for(var i=0; i< scareNames.length; i++ )
	{
		oCell = oFirstRow.insertCell();
		oCell.colSpan=periods.length;
		oCell.innerHTML = scareNames[i];

		for( var k=0; k<periods.length; k++ )
		{
			oTimeCell = oTimeRow.insertCell();
			oTimeCell.innerHTML = periods[k];
		}
	}

	// 初始化其他行，行头是单位名称，其他列是数字
	for(var i=0; i<userNames.length; i++ )
	{
		var oRow = oTBody0.insertRow();
		var oCell = oRow.insertCell();
		oCell.innerHTML=userNames[i];

		for( var j=0; j<scareNames.length; j++ )
		{
			for( var k=0; k<periods.length; k++ )
			{
				oCell = oRow.insertCell();
				oCell.innerHTML = scareArray[i][k][j];
			}
		}
	}

	var oTable = document.getElementById( "oTable" );
	var oTypes = new Array();

	oTypes[0] = "String";
	for ( var i = 0; i < scareNames.length; i++ ) {
		oTypes[i] = "Number";
	}

	var st = new SortableTable(oTable, oTypes);

	//doform1();
}


function doform1()
{
	var oScalarx = document.getElementById( "scalarx" );
	var oScalary = document.getElementById( "scalary" );

	// 清空下拉框
	clearSelect( oScalarx );
	clearSelect( oScalary );

	var oTHead0 = document.getElementById( "oTHead0" );
	var oRows = oTHead0.rows;

	if( mothodFlag == 4 )
	{

		var index = 1;

		var oRow = oRows(oRows.length - 2);
		var oCells = oRow.cells;

		for( var i=1; i<oCells.length; i++ )
		{
			for( var j=0; j<periods.length; j++ )
			{
				var oText = periods[j] + "--" + oCells(i).innerHTML;
				var oOption = new Option( oText, index );
				oScalarx.add( oOption );
				oOption = new Option( oText, index );
				oScalary.add( oOption );

				index++;
			}
		}


	} else
	{
		var oRow = oRows(oRows.length - 1);
		var oCells = oRow.cells;

		for( var i=1; i<oCells.length; i++ )
		{
			var oOption = new Option( oCells(i).innerHTML, i );
			oScalarx.add( oOption );
			oOption = new Option( oCells(i).innerHTML, i );
			oScalary.add( oOption );
		}

	}

}

function submitform1()
{
	var oform1 = document.form1;
	oform1.target = "_self";

	oform1.action = "/Liangbu/jsp/analyseManager/statistics.jsp";

	var oScalarx = oform1.scalarx;
	var oScalary = oform1.scalary;


	var oIndexX = parseInt( oScalarx.options[oScalarx.selectedIndex].value );
	var oTextX = oScalarx.options[oScalarx.selectedIndex].innerHTML;

	var oIndexY = parseInt( oScalary.options[oScalary.selectedIndex].value );
	var oTextY = oScalary.options[oScalary.selectedIndex].innerHTML;

	var oBodyRows = oTBody0.rows;

	// remove hidden input scalarx, scalary field if there's any

	for( var i=0; i<oBodyRows.length; i++ )
	{
		var oBodyRow = oBodyRows(i);

		var oInput = document.createElement("input");
		oInput.type = "hidden";
	    	oInput.name = "scalarx";
	    	oInput.value = oBodyRow.cells( oIndexX ).innerHTML;
	    	oform1.appendChild( oInput );

	    	oInput = document.createElement("input");
		oInput.type = "hidden";
	    	oInput.name = "scalary";
	    	oInput.value = oBodyRow.cells( oIndexY ).innerHTML;
	    	oform1.appendChild( oInput );
    	}

	var oInput = document.createElement( "input" );
	oInput.type = "hidden";
	oInput.name = "xLabel";
	oInput.value = encodeURIComponent( oTextX );
	oform1.appendChild( oInput );

	oInput = document.createElement( "input" );
	oInput.type = "hidden";
	oInput.name = "yLabel";
	oInput.value = encodeURIComponent( oTextY );
	oform1.appendChild( oInput );

	var oMethod = oform1.method;
	var oMethodValue = oMethod.options[oMethod.selectedIndex].value;

	if( oMethodValue == "MovingAverage" && oBodyRows.length <12 )
	{
		alert( "季节分析需要12组以上数据" );
		return false;
	}

	if( oMethodValue == "ReviseExponent" && oBodyRows.length <3 )
	{
		alert( "修正指数分析需要3组以上数据" );
		return false;
	}

	if( oMethodValue == "GongBoZi" && oBodyRows.length <3 )
	{
		alert( "修正指数分析需要3组以上数据" );
		return false;
	}

	oInput = document.createElement( "input" );
	oInput.type = "hidden";
	oInput.name = "stMethod";
	oInput.value = oMethodValue;
	oform1.appendChild( oInput );

    	oInput = document.createElement( "input" );
	oInput.type = "hidden";
	oInput.name = "title2";
	oInput.value = encodeURIComponent( oform1.title.value );
	oform1.appendChild( oInput );

	oform1.submit();
}

function changeDefaultTitleValue( obj )
{
	var oMethodValue = obj.options[obj.selectedIndex].value;

	var oform1 = document.form1;
	oform1.title.value=  obj.options[obj.selectedIndex].innerHTML ;

	if( oMethodValue == "SimpleAverage" ||
		oMethodValue == "MovingAverage" )
	{
		oform1.scalarx.disabled=true;
	}
	else
	{
		oform1.scalarx.disabled=false;
	}
}

function setChartFlag(type)
{
    form1.chartflag.value = type;
}

</SCRIPT>
<body>

<!-------------------------------------------------------------------------------->

<form name="form1" method="post" action="/scalarquery/chart" target="chart">
<input type="hidden" name="chartflag">
<input type="hidden" name="tasktimeids" value = "<%=params[:taskTimes]%>">
<input type="hidden" name="unitids" value = "<%=params[:unitIDs]%>">
<input type="hidden" name="datas" value = "">
<input type="hidden" name="scalars" value = "">

  <table >
      <tr align=left>
            <td>展现方式：</td>
            <td><INPUT  type=radio name=radios value="1"
            		onclick="createDropDownList(periods,1)">
            	按任务时间</td>
            <td><INPUT  type=radio name=radios value="2"
            		onclick="createDropDownList(userNames_text,2)">
            	按单位</td>
            <td><INPUT type=radio name=radios value="3"
            		onclick="createDropDownList(scareNames_text,3)">
            	按指标</td>
            <td><INPUT type="radio" name="radios" value="4"
            		onclick="displayAllData()">
            	所有数据&nbsp;&nbsp;&nbsp;
            </td>

              <td>
              <SELECT onChange="createTableByListValue(this);" name=select1>
              </SELECT>
              </td>
      </tr>

      <tr align=left>
                <td>
                <INPUT onclick="exchangeRowAndColumn()" type=button value="行列转置">
                </td>
                <td>
                <INPUT onclick="buildExcel()" type="button" value="导出EXCEL" >
                </td>
                <td>
              <input type="hidden" name="taskID" value="LB"/>
              <input type="hidden" name="taskTimes" value="<%=params[:taskTimes]%>"/>
              <input type="hidden" name="unitIDs" value="<%=params[:unitIDs]%>"/>
              <input type="hidden" name="expressions" value="<%=params[:expressions]%>"/>
              <input type="hidden" name="dictions" value="<%=params[:dictions]%>"/>
              
       </tr>
  </table>
  <table>
  <tr>
  <td>选择图形方案：</td>
            <td><INPUT  type=radio name="pie" value="1" onclick="setChartFlag('pie')">饼图</td>
            <td><INPUT  type=radio name="pie" value="2" onclick="setChartFlag('bar')">柱图</td>
            <td><INPUT  type=radio name="pie" value="3"	onclick="setChartFlag('line')">线图</td>
            <td><INPUT  type=radio name="pie" value="4"	onclick="setChartFlag('trend')">趋势图</td>
            <td><INPUT  type=radio name="pie" value="5" onclick="setChartFlag('area')">面积图</td>
            <td><INPUT  type=radio name="pie" value="6" onclick="setChartFlag('polar')">雷达图</td>	

  </tr>
  </table>
<hr noshade size="1"/>

<!--
<table>
	<tr align="left">
		<td>
		分析方法：
		</td>
		<td>
		<select name="method" onchange="changeDefaultTitleValue( this )">
			<option value="LinearRegression">一元线性回归</option>
			<option value="Correlation">相关系数</option>
			<option value="ReviseExponent">修正指数曲线</option>
			<option value="GongBoZi">龚柏兹曲线</option>
			<option value="SimpleAverage">简单平均</option>
			<option value="MovingAverage">季节移动平均</option>
		</select>
		</td>

		<td>
		指标一：
		</td>
		<td>
		<select name="scalarx">
		</select>
		</td>

		<td>
		指标二：
		</td>
		<td>
		<select name="scalary">
		</select>
		</td>

	</tr>
	<tr>
		<td>
		主题：
		</td>

		<td>
		<input type="text" name="title" value="一元线性回归"/>
		</td>

		<td colspan="4">
		&nbsp;&nbsp;
		<input type="button" value="统计分析" onclick="return submitform1()"/>
		</td>
	</tr>
</table>

<hr noshade size="1"/>
-->

<TABLE  class="sort-table" id="oTable" border="1">

  <THead id="oTHead0"></THead>
  <TBODY id="oTBody0"></TBODY>
</TABLE>

</form>
<iframe  SCROLLING=auto height="93%" width="97%" FRAMEBORDER=0  name="chart" ></iframe>

<script language="javascript">
//初始按按任务时间方式显示结果
form1.radios[0].click();
</script>
</body>
</html>